"""此文件提供高效的优化计算"""

class Queue:
    """int 队列"""
    def __init__(self, length, Set = 0):
        self.q = []
        for i in range(length):
            self.q.append(Set)
        self.end = length
        self.p = 0 # pointer
    
    def push(self, Int):
        self.q[self.p] = Int
        self.p += 1
        if self.p == self.end:
            self.p = 0

    def get_sum(self):
        Sum = 0
        for i in range(self.end):
            Sum += self.q[i]
        return Sum
    
    def get_averge(self):
        Sum = 1.0
        for i in range(self.end):
            Sum += self.q[i]
        Sum = Sum / self.end
        return Sum

def get_version():
    return "Rubidium 0.1.2"